package com.linln.modules.system.domain;

import com.linln.component.excel.annotation.Excel;
import com.linln.component.excel.enums.ExcelType;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "Patient_BaseInfo", schema = "dbo", catalog = "WQR")
@EntityListeners(AuditingEntityListener.class)
@Excel("患者数据")
public class PatientBaseInfoEntity {
    @Excel(value = "用户ID", type = ExcelType.EXPORT)
    private Integer id;
    //  @Excel("住院号")
    private String zyh;
    @Excel("病案号")
    private String bah;
    @Excel("年限")
    private String nx;
    @Excel("姓名")
    private String xm;
    @Excel("性别")
    private String xb;
    @Excel("性别编码")
    private String xbbm;
    @Excel("民族")
    private String mz;
    @Excel("民族编码")
    private String mzbm;
    @Excel("年龄")
    private String nl;
    @Excel("出生日期")
    private Date csrq;
    @Excel("身份证号")
    private String sfzh;
    @Excel("户口所在地")
    private String hkszd;
    @Excel("出生地")
    private String csd;
    @Excel("现住址")
    private String xzz;
    @Excel("生存情况")
    private String scqk;
    @Excel("联系人")
    private String lxr;
    @Excel("联系人电话")
    private String lxrdh;
    @Excel("邮编")
    private String yb;
    @Excel("入院日期")
    private Date ryrq;
    @Excel("出院日期")
    private Date cyrq;
    @Excel("离院方式")
    private String lyfs;
    @Excel("死亡时间")
    private String swsj;
    @Excel("状态")
    private Integer state;
    @CreatedDate
    private Date createDate;
    private String hkszdS;
    private String hkszdSs;
    private String hkszdX;
    private String csdS;
    private String csdSs;
    private String csdX;
    private String xzzS;
    private String xzzSs;
    private String xzzX;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "zyh", nullable = true, length = 20)
    public String getZyh() {
        return zyh;
    }

    public void setZyh(String zyh) {
        this.zyh = zyh;
    }

    @Basic
    @Column(name = "bah", nullable = false, length = 20)
    public String getBah() {
        return bah;
    }

    public void setBah(String bah) {
        this.bah = bah;
    }

    @Basic
    @Column(name = "nx", nullable = true, length = 15)
    public String getNx() {
        return nx;
    }

    public void setNx(String nx) {
        this.nx = nx;
    }

    @Basic
    @Column(name = "xm", nullable = true, length = 255)
    public String getXm() {
        return xm;
    }

    public void setXm(String xm) {
        this.xm = xm;
    }

    @Basic
    @Column(name = "xb", nullable = false, length = 2)
    public String getXb() {
        return xb;
    }

    public void setXb(String xb) {
        this.xb = xb;
    }

    @Basic
    @Column(name = "xbbm", nullable = true, length = 4)
    public String getXbbm() {
        return xbbm;
    }

    public void setXbbm(String xbbm) {
        this.xbbm = xbbm;
    }

    @Basic
    @Column(name = "mz", nullable = false, length = 10)
    public String getMz() {
        return mz;
    }

    public void setMz(String mz) {
        this.mz = mz;
    }

    @Basic
    @Column(name = "mzbm", nullable = true, length = 10)
    public String getMzbm() {
        return mzbm;
    }

    public void setMzbm(String mzbm) {
        this.mzbm = mzbm;
    }

    @Basic
    @Column(name = "nl", nullable = false, length = 10)
    public String getNl() {
        return nl;
    }

    public void setNl(String nl) {
        this.nl = nl;
    }

    @Basic
    @Column(name = "csrq", nullable = true)
    public Date getCsrq() {
        return csrq;
    }

    public void setCsrq(Date csrq) {
        this.csrq = csrq;
    }

    @Basic
    @Column(name = "sfzh", nullable = true, length = 20)
    public String getSfzh() {
        return sfzh;
    }

    public void setSfzh(String sfzh) {
        this.sfzh = sfzh;
    }

    @Basic
    @Column(name = "hkszd", nullable = true, length = 255)
    public String getHkszd() {
        return hkszd;
    }

    public void setHkszd(String hkszd) {
        this.hkszd = hkszd;
    }

    @Basic
    @Column(name = "csd", nullable = true, length = 255)
    public String getCsd() {
        return csd;
    }

    public void setCsd(String csd) {
        this.csd = csd;
    }

    @Basic
    @Column(name = "xzz", nullable = true, length = 255)
    public String getXzz() {
        return xzz;
    }

    public void setXzz(String xzz) {
        this.xzz = xzz;
    }

    @Basic
    @Column(name = "scqk", nullable = true, length = 10)
    public String getScqk() {
        return scqk;
    }

    public void setScqk(String scqk) {
        this.scqk = scqk;
    }

    @Basic
    @Column(name = "lxr", nullable = true, length = 50)
    public String getLxr() {
        return lxr;
    }

    public void setLxr(String lxr) {
        this.lxr = lxr;
    }

    @Basic
    @Column(name = "lxrdh", nullable = true, length = 20)
    public String getLxrdh() {
        return lxrdh;
    }

    public void setLxrdh(String lxrdh) {
        this.lxrdh = lxrdh;
    }

    @Basic
    @Column(name = "yb", nullable = true, length = 10)
    public String getYb() {
        return yb;
    }

    public void setYb(String yb) {
        this.yb = yb;
    }

    @Basic
    @Column(name = "ryrq", nullable = true)
    public Date getRyrq() {
        return ryrq;
    }

    public void setRyrq(Date ryrq) {
        this.ryrq = ryrq;
    }

    @Basic
    @Column(name = "cyrq", nullable = true)
    public Date getCyrq() {
        return cyrq;
    }

    public void setCyrq(Date cyrq) {
        this.cyrq = cyrq;
    }

    @Basic
    @Column(name = "lyfs", nullable = true, length = 10)
    public String getLyfs() {
        return lyfs;
    }

    public void setLyfs(String lyfs) {
        this.lyfs = lyfs;
    }

    @Basic
    @Column(name = "swsj", nullable = true, length = 50)
    public String getSwsj() {
        return swsj;
    }

    public void setSwsj(String swsj) {
        this.swsj = swsj;
    }

    @Basic
    @Column(name = "state", nullable = true)
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Basic
    @Column(name = "createDate", nullable = false)
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "hkszd_s", nullable = true, length = 20)
    public String getHkszdS() {
        return hkszdS;
    }

    public void setHkszdS(String hkszdS) {
        this.hkszdS = hkszdS;
    }

    @Basic
    @Column(name = "hkszd_ss", nullable = true, length = 20)
    public String getHkszdSs() {
        return hkszdSs;
    }

    public void setHkszdSs(String hkszdSs) {
        this.hkszdSs = hkszdSs;
    }

    @Basic
    @Column(name = "hkszd_x", nullable = true, length = 20)
    public String getHkszdX() {
        return hkszdX;
    }

    public void setHkszdX(String hkszdX) {
        this.hkszdX = hkszdX;
    }

    @Basic
    @Column(name = "csd_s", nullable = true, length = 20)
    public String getCsdS() {
        return csdS;
    }

    public void setCsdS(String csdS) {
        this.csdS = csdS;
    }

    @Basic
    @Column(name = "csd_ss", nullable = true, length = 20)
    public String getCsdSs() {
        return csdSs;
    }

    public void setCsdSs(String csdSs) {
        this.csdSs = csdSs;
    }

    @Basic
    @Column(name = "csd_x", nullable = true, length = 20)
    public String getCsdX() {
        return csdX;
    }

    public void setCsdX(String csdX) {
        this.csdX = csdX;
    }

    @Basic
    @Column(name = "xzz_s", nullable = true, length = 20)
    public String getXzzS() {
        return xzzS;
    }

    public void setXzzS(String xzzS) {
        this.xzzS = xzzS;
    }

    @Basic
    @Column(name = "xzz_ss", nullable = true, length = 20)
    public String getXzzSs() {
        return xzzSs;
    }

    public void setXzzSs(String xzzSs) {
        this.xzzSs = xzzSs;
    }

    @Basic
    @Column(name = "xzz_x", nullable = true, length = 20)
    public String getXzzX() {
        return xzzX;
    }

    public void setXzzX(String xzzX) {
        this.xzzX = xzzX;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PatientBaseInfoEntity that = (PatientBaseInfoEntity) o;
        return id == that.id && Objects.equals(zyh, that.zyh) && Objects.equals(bah, that.bah) && Objects.equals(nx, that.nx) && Objects.equals(xm, that.xm) && Objects.equals(xb, that.xb) && Objects.equals(xbbm, that.xbbm) && Objects.equals(mz, that.mz) && Objects.equals(mzbm, that.mzbm) && Objects.equals(nl, that.nl) && Objects.equals(csrq, that.csrq) && Objects.equals(sfzh, that.sfzh) && Objects.equals(hkszd, that.hkszd) && Objects.equals(csd, that.csd) && Objects.equals(xzz, that.xzz) && Objects.equals(scqk, that.scqk) && Objects.equals(lxr, that.lxr) && Objects.equals(lxrdh, that.lxrdh) && Objects.equals(yb, that.yb) && Objects.equals(ryrq, that.ryrq) && Objects.equals(cyrq, that.cyrq) && Objects.equals(lyfs, that.lyfs) && Objects.equals(swsj, that.swsj) && Objects.equals(state, that.state) && Objects.equals(createDate, that.createDate) && Objects.equals(hkszdS, that.hkszdS) && Objects.equals(hkszdSs, that.hkszdSs) && Objects.equals(hkszdX, that.hkszdX) && Objects.equals(csdS, that.csdS) && Objects.equals(csdSs, that.csdSs) && Objects.equals(csdX, that.csdX) && Objects.equals(xzzS, that.xzzS) && Objects.equals(xzzSs, that.xzzSs) && Objects.equals(xzzX, that.xzzX);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, zyh, bah, nx, xm, xb, xbbm, mz, mzbm, nl, csrq, sfzh, hkszd, csd, xzz, scqk, lxr, lxrdh, yb, ryrq, cyrq, lyfs, swsj, state, createDate, hkszdS, hkszdSs, hkszdX, csdS, csdSs, csdX, xzzS, xzzSs, xzzX);
    }
}
